<?php

Yii::setAlias('@tests', dirname(__DIR__) . '/tests');

$params = require(__DIR__ . '/params.php');
$db = require(__DIR__ . '/db.php');
$DIR = dirname(__DIR__);
return [
    'id' => 'basic-console',
    'basePath' => $DIR,
    'timeZone' => 'PRC',
    'vendorPath' => $DIR . '/../YII_framework_2',
    'runtimePath' => $DIR . '/../YII_framework_2/runtime',
    'bootstrap' => ['log', 'gii'],
    'controllerNamespace' => 'app\commands',
    'modules' => [
        //'gii' => 'yii\gii\Module',
        'gii' => array(
            'class'=> 'yii\gii\Module',
            'allowedIPs' => array('192.168.31.*', '::1'),    //将此处的IP改为本机客户端目前使用的IP
      )
    ],
    'components' => [
    'cache' => [
        'class' => 'yii\caching\FileCache',
    ],
    'log' => [
        'targets' => [
            [
                'class' => 'yii\log\FileTarget',
                'levels' => ['error', 'warning'],
            ],
        ],
    ],
    'db' => $db,
],
    'params' => $params,
];
